package com.ihr360.commons.model.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;

/** 纳税身份 */
@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum TaxRole {

    NATIVE("本地人", "native"),
    FOREIGN("外籍人", "foreign");

    private String title;

    private String engTitle;

    TaxRole(String title, String engTitle) {
        this.title = title;
        this.engTitle = engTitle;
    }


    @JsonCreator
    public static TaxRole factory(@JsonProperty(value = "id") String id) {
        return TaxRole.valueOf(id);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getEngTitle() {
        return engTitle;
    }

    public void setEngTitle(String engTitle) {
        this.engTitle = engTitle;
    }
}
